<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./font_3563144_uslby730w7o/iconfont.css">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            list-style: none;
            background-color: rgba(243, 244, 245);
        }

        .bigbox {
            display: flex;
        }

        .left {
            width: 200px;
            background-color: #353942;
        }

        .left li {
            height: 50px;
            color: white;
            text-align: center;
            padding: 0 10px;
            line-height: 50px;
        }

        .right {
            flex: 1;
        }

        .header {
            display: flex;
            background-color: white;
            padding: 20px;
        }

        .header div {
            margin-left: 20px;
        }

        .header input {
            margin-left: 20px;
            background-color: rgba(243, 244, 245);
        }

        .two {
            /* background-color: aquamarine; */
            height: 60px;
            line-height: 60px;
            margin-left: 10px;
        }

        .photo {
            display: flex;
            justify-content: space-around;
        }

        .zhetu {
            width: 45%;
            height: 400px;
            background-color: white;
        }

        .zhutu {
            width: 45%;
            height: 400px;
            background-color: white;
        }

        .secend {
            display: flex;
            justify-content: space-around;
        }

        .biao {
            width: 45%;
            height: 400px;
            background-color: white;
            margin-top: 20px;
        }

        table {
            width: 100%;
            height: 400px;
            text-align: center;

        }

        .theright {
            width: 45%;
            height: 400px;
            background-color: white;
            margin-top: 20px;
        }
    </style>
</head>

<body>
    <div class="bigbox" style="display:flex ;">
        <div class="left">
            <ul>
                <li>AdminLTE 3</li>
                <li>Alexander Pierce </li>
                <li style="background-color: rgba(20,126,251);">Dashboard</li>
                <li>Dashboard v1</li>
                <li>Dashboard v2</li>
                <li style="background-color: rgba(235,236,235); color:black;">Dashboard v3</li>
                <li>Widgets</li>
                <li>Charts</li>
                <li>Elements</li>
                <li>Forms </li>
                <li>Tables</li>
            </ul>
        </div>
        <div class="right">
            <div class="header">
                <div>Home</div>
                <div>Contact</div>
                <input type="text" placeholder="Search">
            </div>
            <div class="two">
                <div>Dashboard V3</div>
            </div>
            <div class="photo">
                <div class="zhetu"></div>
                <div class="zhutu"></div>
            </div>
            <div class="secend">
                <div class="biao">
                    <div>Products</div>
                    <table>
                        <thead>
                            <tr>
                                <th>Product</th>
                                <th>Price</th>
                                <th>Sales</th>
                                <th>More</th>
                            </tr>
                        </thead>
                        <tbody>
                            <!-- <tr>
                                <td>Some Product</td>
                                <td>$13 USD</td>
                                <td>⬆12% 12,000 Sold</td>
                                <td></td>
                            </tr> -->
                        </tbody>
                    </table>
                </div>
                <div class="theright"></div>
            </div>
        </div>
    </div>
</body>

</html>
<script src="./promise-ajax.js"></script>
<script src="./mock.js"></script>
<script src="./mockdata.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.0/echarts.js"></script>
<script src="./photo.js"></script>
<script>
    // 声明变量
    var zheTu = document.querySelector('.zhetu')
    var zhuTu = document.querySelector('.zhutu')

    // 折线图
    var myCharts = echarts.init(zheTu);
    var option;
    option && myCharts.setOption(option);

    // 柱状图
    var myChart = echarts.init(zhuTu);
    var options;
    options && myChart.setOption(options);


    // 表格
    var tBody = document.querySelector('tbody');
    console.log(tBody);

    render(data.list)

    function render(data) {
        var str = data.map((item, index) => {
            return `<tr>
                        <td>${item.name}</td>
                        <td>${item.phone}</td>
                        <td>${item.email}</td>
                        <td>
                            <span class:"iconfont icon-sousuo"></span>
                        </td>
                    </tr>`
        }).join('')
        tBody.innerHTML = str;
    }
</script>